﻿namespace HamcoWcs.Models.Charts
{
    public class UseRateDto
    {
        public UseRateDto()
        {

        }

        public UseRateDto(string name, double total, double free, string unit = "")
        {
            Name = name;
            Total = total;
            Free = free;
            Unit = unit;
            Used = total - free;
            UseRate = (Used / Total);
            UseRateStr = UseRate.ToString("N2");
        }

        public string Name { get; set; }
        public string Unit { get; set; }
        public double Total { get; set; }
        public double Used { get; set; }
        public double Free { get; set; }
        public double UseRate { get; set; }
        public string UseRateStr { get; set; }
    }
}
